import { request } from 'umi';
/** 获取当前的用户 GET /api/currentUser */

export async function list(options) {
  return request('/admin/freight/list', {
    method: 'GET',
    params: {...options}
    // ...(options || {}),
  });
}

export async function detail(options) {
  return request('/admin/freight/detail', {
    method: 'GET',
    params: {...options}
    // ...(options || {}),
  });
}

export async function del(options) {
  return request('/admin/freight/delete', {
    method: 'DELETE',
    params: {...options}
    // ...(options || {}),
  });
}

export async function create(body) {
  return request('/admin/freight/create', {
    method: 'POST',
    data: body
    // ...(options || {}),
  });
}

export async function update(body) {
  return request('/admin/freight/update', {
    method: 'PUT',
    data: body
    // ...(options || {}),
  });
}

export async function setDefault(body) {
  return request('/admin/shop/updateDefaultFreight', {
    method: 'PUT',
    data: body
    // ...(options || {}),
  });
}